package com.rajaev.dtu.tractor.app.service;


import com.rajaev.dtu.tractor.domain.entity.BatteryRunInfoResult;
import com.rajaev.dtu.tractor.domain.vo.StatisticResultVo;

import java.util.concurrent.ExecutionException;

/**
 * @Created with IDEA
 * @author: tianjie
 * @Date:2019/6/14
 * @Time:17:00
 */
public interface StatisticService {


    /**
     * 从mongodb中获取车辆的历史运行信息，包括总充电量，总耗电量，总运行时长，日均运行时长
     * @param vin
     * @return
     */
    BatteryRunInfoResult getBatteryRunInfoResultFromMongo(String vin);

    /**
     * 根据客户的id，从data文件中查询客户的所有车辆的日期内的平均充电量
     * @param startDate
     * @param endDate
     * @param projectTeamIdArray
     * @return
     */
    StatisticResultVo queryAvgChargeInfoByProjectTeam(Integer startDate, Integer endDate, String[] projectTeamIdArray) throws ExecutionException, InterruptedException;


    /**
     *
     * @param startDate 开始日期
     * @param endDate  结束日期
     * @param customerIdArray 客户的id数组
     * @return
     * @throws ExecutionException
     * @throws InterruptedException
     */
    StatisticResultVo queryAvgChargeInfoByCustomerId(Integer startDate, Integer endDate, String[] customerIdArray) throws ExecutionException, InterruptedException;

    /**
     * 根据设备vin，从data文件中查询客户的所有车辆的日期内的平均充电量
     * @param startDate
     * @param endDate
     * @param vin
     * @return
     */
    StatisticResultVo queryAvgChargeInfo(Integer startDate, Integer endDate,  String vin) throws ExecutionException, InterruptedException;









}
